Virtual machine (VM) environments enable multiple VMs to execute on a single processor system as separate logical operating entities. Typically, the logically separated VMs share common resources of the processor system such as hardware devices and device drivers. To manage the co-existence of the multiple VMs and to enable exchanging information with common resources and between the VMs, VM environments often use a virtual machine monitor (VMM) or hypervisor.
In known VM systems, a VM can share its memory space with other VMs or hardware devices using the VMM or hypervisor. For example, to share a memory page with another VM, the VM can grant the sharing of its memory page through the hypervisor. To share the memory page with a hardware device, the VM must invoke a separate memory page sharing grant. In such known systems, to ensure protection of the memory page from improper accesses by the hardware device and software running on the other VM, the hypervisor uses separate memory management and protection techniques implemented as separate processes without any collaboration therebetween.